/*
 * @Author: wei_jt@ecidi.com
 * @Date: 2019-11-07 09:36:15
 * @LastEditors: ye_xf
 * @LastEditTime: 2022-08-05 15:28:31
 * @Description: 用户相关接口
 */
import request from '@/utils/request'
import store from '@/store'
/**查询用户菜单 */
export function getRouter(data) {
  return request({
    url: '/sys-user/user/menus',
    method: 'get',
    params: data
  })
}

/**查询用户菜单下按钮 */
export function getPermissions(menuId) {
  return request({
    url: '/sys-user/user/buttons',
    method: 'get',
    params: {
      menuId,
      portalId: store.state.portal.id
    }
  })
}

/**获取所有门户 */
export function getPortals() {
  return request({
    url: '/sys-user/user/portals',
    method: 'GET',
  })
}
// 获取用户信息
export function getUser(data) {
  return request({
    url: 'sys-user/userInfo',
    method: 'get',
    params: data
  })
}

export function searchUser(params) {
  return request({
    url: '/sys-user/users/page',
    method: 'GET',
    params: params,
  })
}
